/* 全局样式 */
:root {
  --primary-color: #e1251b;
  --secondary-color: #f10215;
  --light-grey: #f5f5f5;
  --text-color: #333;
  --link-color: #666;
  --border-color: #e4e4e4;
  --price-color: #e2231a;
  --discount-color: #ff0036;
  --header-red: #e1251b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--light-grey);
}

a {
  text-decoration: none;
  color: var(--link-color);
  &:hover {
    color: var(--primary-color);
  }
}

.container {
  width: 1190px;
  margin: 0 auto;
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  color: var(--primary-color);
  font-weight: bold;
}

/* 顶部导航栏样式 */
.top-bar {
  height: 30px;
  background-color: #e3e4e5;
  border-bottom: 1px solid #ddd;
  color: #999;
  line-height: 30px;
  font-size: 12px;
}

/* 头部搜索区域样式 */
.header {
  background-color: white;
  padding: 10px 0;
  .logo {
    width: 190px;
    height: 120px;
    background: url('/assets/images/logo.png') no-repeat;
    background-size: contain;
  }
  .search-box {
    width: 550px;
    .search-input {
      width: 500px;
      height: 36px;
      border: 2px solid var(--primary-color);
      padding: 0 10px;
      &:focus {
        outline: none;
      }
    }
    .search-btn {
      width: 50px;
      height: 36px;
      background-color: var(--primary-color);
      color: white;
      border: none;
      cursor: pointer;
    }
  }
}

/* 主导航样式 */
.main-nav {
  background-color: var(--primary-color);
  height: 40px;
  color: white;
  .nav-item {
    line-height: 40px;
    padding: 0 15px;
    font-size: 15px;
    &:hover {
      background-color: #c81623;
    }
  }
}

/* 分类菜单样式 */
.category-menu {
  width: 190px;
  background-color: #fefefe;
  .cate-item {
    height: 36px;
    line-height: 36px;
    padding: 0 10px;
    &:hover {
      background-color: #d9d9d9;
    }
  }
}

/* 轮播图样式 */
.banner {
  height: 470px;
  margin: 10px 0;
  .carousel-item {
    height: 470px;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
}

/* 商品区域样式 */
.product-section {
  background-color: white;
  margin: 10px 0;
  padding: 15px;
  .section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    border-left: 5px solid var(--primary-color);
    padding-left: 10px;
  }
  .product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 15px;
  }
  .product-item {
    padding: 10px;
    transition: all 0.3s;
    &:hover {
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
      transform: translateY(-5px);
    }
    .product-img {
      width: 100%;
      height: 200px;
      object-fit: contain;
    }
    .product-title {
      font-size: 14px;
      margin: 10px 0;
      height: 38px;
      overflow: hidden;
    }
    .product-price {
      font-size: 18px;
      color: var(--primary-color);
    }
  }
}

/* 底部样式 */
.footer {
  background-color: #eaeaea;
  padding: 20px 0;
  margin-top: 20px;
  
  .footer-links {
    display: flex;
    justify-content: space-around;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
    
    .link-group {
      h4 {
        font-size: 14px;
        margin-bottom: 10px;
      }
      a {
        display: block;
        font-size: 12px;
        margin: 5px 0;
      }
    }
  }
  
  .copyright {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 15px;
  }
} 